package io.renren.modules.shop.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.math.BigDecimal;
import java.util.Date;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 优惠券表
 */
@ApiModel(value = "io-renren-modules-shop-entity-GoodsCoupon")
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "goods_coupon")
public class GoodsCoupon {
    /**
     * 主键
     */

    @ApiModelProperty(value = "主键")
    @TableId(value = "coupon_id",type = IdType.AUTO)
    private Integer couponId;

    /**
     * 开始时间
     */
    @TableField(value = "create_time")
    @ApiModelProperty(value = "开始时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private Date createTime;

    /**
     * 结束时间
     */
    @TableField(value = "end_time")
    @ApiModelProperty(value = "结束时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private Date endTime;

    /**
     * 优惠券 需达金额
     */
    @TableField(value = "coupon_sum")
    @ApiModelProperty(value = "优惠券 需达金额")
    private BigDecimal couponSum;

    /**
     * 优惠券 可减金额
     */
    @TableField(value = "coupon_size")
    @ApiModelProperty(value = "优惠券 可减金额")
    private BigDecimal couponSize;

    public static final String COL_COUPON_ID = "coupon_id";

    public static final String COL_CREATE_TIME = "create_time";

    public static final String COL_END_TIME = "end_time";

    public static final String COL_COUPON_SUM = "coupon_sum";

    public static final String COL_COUPON_SIZE = "coupon_size";
}
